// GENERAL INFOWINDOW
.cartodb-infowindow {
  background: $white;
  box-shadow: $shadow1;
  @include transform(translate(-97px, -12px));


  &:after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 5;
    width: 14px;
    height: 14px;
    background: $white;
    box-shadow: 1px 1px 0 0 rgba($dark, 0.5);
    @include transform(translate(-50%, 50%) rotate(45deg));
  }
  &.hidden{
    visibility: hidden;
    opacity: 0;
  }



  .cartodb-popup{
    position: relative;
    width: 250px;
    @media (max-width: $br-mobile) {
      width: 200px;
    }
    height: auto;
    padding: 0;
    padding-right: 0;
    margin: 0;
    background: $white;
    .jspPane {
      padding: 0 !important;
    }
    a.cartodb-popup-close-button{
      position: absolute;
      top: 0px;
      right: 0px;
      width: 36px;
      height: 26px;
      padding: 0;
      background: image-url('svg-icons/close.svg') no-repeat center;
      background-size: 16px 16px;
      text-indent: -9999px;
      font-size: 0;
      line-height: 0;
      text-transform: uppercase;
      z-index: 3;
    }

    .cartodb-popup-content-wrapper{
      width: 100%;
      max-width: none;
      padding: 0;
      overflow-x: hidden;
      background: $white;
      padding: 0;
      &.analysis-active{
        padding: 0 0 67px;
      }
      .cartodb-popup-header{
        h2{
          font-size: 21px;
          @media (max-width: $br-mobile) {
            font-size: 18px;
          }
          line-height: 1.25;
          padding: 20px 20px 15px;
        }
      }
      .cartodb-popup-fixed{
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 0 20px;
        z-index: 5;
        background: $white;
        border-top: 1px solid $border;
        @include display-flex();
        @include justify-content(space-between);
        @media (max-width: $br-mobile - 1) {
          padding: 0 10px;
        }

        .btn{
          width: 100%;
          margin: 15px 1px;
          @media (max-width: $br-mobileMap - 1){
            font-size: 12px;
          }
          &.dont-analyze{
            // display: none !important;
            opacity: 0.5;
          }
        }
      }
      .cartodb-popup-content{
        display: block;
        width: 100%;
        max-width: 100%;
        min-height: 5px;
        height: auto;
        max-height: 260px !important;
        margin: 0;
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden!important;
        outline: none;
        text-align: left;
        .cartodb-popup-content-inside{
          padding: 20px 20px 10px;
          @include clearfix();
        }
        h2,h3,h4,p{
          font-family: "Fira Sans" , Helvetica;
          width: 100%;
        }
        h2{
          font-size: 21px;
          @media (max-width: $br-mobile) {
            font-size: 18px;
          }
          line-height: 1.25;
          padding: 0 0 10px;
        }
        h4{
          color: $dark;
          font-size: 12px;
          @media (max-width: $br-mobile) {
            font-size: 10px;
          }
          font-weight: 500;
          width: 50%;
          float: left;
          line-height: 1.25;
          min-height: 1px;
          clear: both;
          padding: 8px 5px 0 0;
          &.no-float{
            width: 100%;
            float: none;
            padding: 0 0 5px;
          }
        }
        p{
          color: $dark;
          font-size: 13px;
          @media (max-width: $br-mobile) {
            font-size: 11px;
          }
          width: 50%;
          float: left;
          line-height: 1.25;
          min-height: 1px;
          padding: 8px 0 0;
          &.no-float{
            width: 100%;
            float: none;
            padding: 0;
          }
        }
        .btn{
          width: 100%;
          margin: 5px 0;
        }
      }
    }
    .cartodb-popup-tip-container{
      display: none;
      background: none;
    }
  }
}








// STORY INFOWINDOW
$story-w: 215px;
.story-infowindow{
  position: absolute;
  width: $story-w;
  padding: 10px 25px 10px 10px;
  background: rgba(#000, 1);
  box-shadow: $shadow1;

  &:after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(#000, 1);
    @include transform(translate(-50%, 50%) rotate(45deg));
  }

  .story-popup{
    .story-popup-content{
      a{
        color: $white;
        h3{
          font-size: 17px;
          span{
            display: block;
            text-align: right;
            font-size: 12px;
          }
        }
        p{
          margin: 5px 0 0;
          color: $cGreen;
          font-size: 12px;
          &:hover{
            color: lighten($cGreen, 5%);
          }
        }
      }
    }
    .close{
      position: absolute;
      top: 0px;
      right: 0px;
      width: 26px;
      height: 26px;
      padding: 5px;
      fill: $white;
      z-index: 3;
    }
  }
}

// STORY MARKER
.thumb-marker {
  .icon-custom-marker {
    position: absolute;
    top: -5px;
    right: -5px;
  }
}

.user-story-marker {
  border: 3px solid #fff;
  border-radius: 100%;
  width: 50px;
  height: 50px;
  overflow: hidden;
  box-shadow: $shadow1;

  img {
    width: auto;
    height: 100%;
  }
}
